package com.lsl.test1;

import com.lsl.test.Person;
import org.junit.Test;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * @author lishuailong
 * @create 2020-07-16 17:08
 */
public class MethodTest {

    @Test
    public void test1(){
        Class<Person> aClass = Person.class;

        //获取方法
        Method[] methods = aClass.getMethods();
        for (Method method : methods) {
            System.out.println("method = " + method);
        }
    }
}
